import request from '@/common/request.js'

const api = {}
// 登录
api.loginDo = params => request.globalRequest(`/login`, 'POST', params, 1);
// 获取用户信息
api.getUserInfo = params => request.globalRequest(`/getInfo`, 'GET', params, 1);
// 查询竞标项目列表
api.getProjectList = params => request.globalRequest(`/system/project/list`, 'GET', params, 1);
// 查询竞标项目详情
api.getProjectInfo = params => request.globalRequest(`/system/project/${params.id}`, 'GET', {}, 1);
// 添加竞标
api.addProject = params => request.globalRequest(`/system/projectLog`, 'POST', params, 1);
// 竞标公司详情
api.seeProjectLog = params => request.globalRequest(`/system/projectLog/list`, 'GET', params, 1);
// 竞标报价详情
api.seeProjectLogDetail = params => request.globalRequest(`/system/projectLogDetail/list`, 'GET', params, 1);
// 修改竞标地址
api.editAddres = params => request.globalRequest(`/system/projectLogDetail`, 'PUT', params, 1);

// 行业类目
api.getcateList = params => request.globalRequest(`/system/cate/list`, 'GET', params, 1);
// 修改企业
api.deitDept = params => request.globalRequest(`/system/dept`, 'PUT', params, 1);
// 修改密码
api.deitPwd = params => request.globalRequest(`/system/user/profile/updatePwd?oldPassword=${params.oldPassword}&newPassword=${params.newPassword}`, 'PUT', {}, 1);
























// 修改密码
api.editPwd = params => request.globalRequest(`api/user/edit`, 'GET', params, 1);
// 提交打卡
api.clockAdd = params => request.globalRequest(`api/clock/add`, 'POST', params, 1);
// 打卡记录
api.seeClock = params => request.globalRequest(`api/clock/index`, 'get', params, 1);
// 服务工单
api.getFwgd = params => request.globalRequest(`api/fwgd/index`, 'get', params, 1);
// 服务对象
api.getOldList = params => request.globalRequest(`api/old/index`, 'get', params, 1);
// 证书列表
api.getCertificate = params => request.globalRequest(`api/qualification/index`, 'get', params, 1);
// 添加证书
api.addCertificate = params => request.globalRequest(`api/qualification/add`, 'post', params, 1);

// 服务工单
api.getFwgdList = params => request.globalRequest(`api/fwgd/index`, 'get', params, 1);
// 服务计划
api.getServicePlan = params => request.globalRequest(`api/fwjh/index`, 'get', params, 1);
// 添加服务记录
api.seavFwjl = params => request.globalRequest(`api/fwjl/add`, 'get', params, 1);

// 查询服务记录
api.getFwjl = params => request.globalRequest(`api/fwjl/index`, 'get', params, 1);
// 通讯录
api.getContact = params => request.globalRequest(`api/contact/index`, 'get', params, 1);


//入户
api.seavFwjh = params => request.globalRequest(`api/fwjh/add`, 'get', params, 1);
//接单详情
api.fwjhInfo = params => request.globalRequest(`api/fwjh/info`, 'get', params, 1);
//服务工单详情
api.fwgdInfo = params => request.globalRequest(`api/fwgd/info`, 'get', params, 1);

// 图片上传
api.uploadImg = params => request.globalRequest(`api/file/upload`, 'post', params, 1);



// 老人
api.getOld = params => request.globalRequest(`api/old/info`, 'get', params, 1);
// 修改老人
api.editOld = params => request.globalRequest(`api/old/edit`, 'get', params, 1);

export default api